<?php

// Zend library include path
set_include_path(get_include_path() . PATH_SEPARATOR . "$_SERVER[DOCUMENT_ROOT]/ZendGdata-1.12.3/library");

include_once("Google_Spreadsheet.php");

$u = "hossain.eps@gmail.com";
$p = "021407016";

$ss = new Google_Spreadsheet($u, $p);
//$ss->useSpreadsheet("https://spreadsheets.google.com/ccc?key=0At3MtK6gNh_2dEluSk45cTgwRDVIZjRMdGJVUnduc1E");
$ss->useSpreadsheet("0At3MtK6gNh_2dEluSk45cTgwRDVIZjRMdGJVUnduc1E");
$ss->useWorksheet("Sheet1");
 
//$rows = $ss->getRows();
// 
//if ($rows) print_r($rows);
//else echo "Error, unable to get spreadsheet data";
 
// double quotes must be used for values with spaces
$rows = $ss->getRows('Name="Nazmul Hossain"');
 
if ($rows) {
    print_r($rows);
}
else echo "Error, unable to get spreadsheet data";
//
//$ss->useSpreadsheet("0At3MtK6gNh_2dEluSk45cTgwRDVIZjRMdGJVUnduc1E",TRUE);
//
//// if not setting worksheet, "Sheet1" is assumed
//// $ss->useWorksheet("worksheetName");
//
//$row = array (
//    "Name" => "John Doe"
//    , "Email" => "john@example.com"
//    , "Address" => "Hello world"
//);
//
//if ($ss->addRow($row))
//    echo "Form data successfully stored using Google Spreadsheet";
//else
//    echo "Error, unable to store spreadsheet data";
?>